package com.tujia.dao.impl;
import com.tujia.ProblemType;
import com.tujia.dao.ProblemTypeDao;
import org.mybatis.spring.SqlSessionTemplate;

public class ProblemTypeDaoImpl implements ProblemTypeDao {
    private SqlSessionTemplate sqlSessionTemplate;

    public ProblemTypeDaoImpl(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    @Override
    public ProblemType getProblemTypeById(Integer id) throws Exception {
        return sqlSessionTemplate.selectOne("problemType.getProblemTypeById", id);
    }
}
